using System;
using DotNetNuke;
using System.Data;

using DotNetNuke.Framework;

namespace PT.ThueXe
{
    public abstract class DataProvider
    {

        #region Shared/Static Methods

        static DataProvider objProvider = null;

        static DataProvider()
        {
            CreateProvider();
        }

        private static void CreateProvider()
        {
            objProvider = (DataProvider)Reflection.CreateObject("data", "PT.ThueXe", "");
        }

        public static DataProvider Instance()
        {
            return objProvider;
        }

        #endregion

        #region Abstract methods

        public abstract IDataReader GetThueXe(int ModuleId, int ItemId);
        public abstract IDataReader GetThueXes(string Name, int CarTypeID, int FromCityID, int ToCityID, DateTime? FromDate, DateTime? ToDate, DateTime? CreatedDate);
        public abstract void AddUpdateThueXe(int ModuleId, int ItemId, string Name, string Address, string Phone, string Email, int CarTypeID, int FromCityID, int ToCityID, DateTime FromDate, DateTime ToDate, string OtherInformation, string DetailInformation, DateTime CreatedDate);
        public abstract void DeleteThueXe(int ModuleId, int ItemId);

        public abstract IDataReader GetCarTypeList();
        public abstract IDataReader GetCityList();

        public abstract IDataReader GetThueXeEmail();
        public abstract void AddUpdateThueXeEmail(string MailFrom, string MailTo);

        #endregion

    }
}
